home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #14
/
Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO
/
math
/
maca_101.zip
/
ADD.DEM
next >
Wrap
Text File
|
1996-01-30
|
2KB
|
70 lines
;ADD.DEM
;DEMO FILE FOR MASSCALC VERSION 1.00
;WRITTEN BY: Ralph W. Reid
;This file may only be distributed in its unmodified form.
;
;DESCRIPTION: This file demonstrates the column addition constructs.
;
;For the latest releases of MASSCALC and other software created by
;Ralph W. Reid, see http://www2.athenon.com/~rreid/products/00-index.html.
;
;HOW TO USE THIS FILE: This file may be piped into MASSCALC, and its
;output displayed as follows:
;TYPE ADD.DEM | MASSCALC | MORE
;This file may be redirected into MASSCALC and its output displayed
;as follows:
;MASSCALC < ADD.DEM | MORE
;These two commands should be run from the operating system prompt.
;add a column of numbers and display the result
print: "Adding a simple column of numbers:"
ADD:
1.50
3.50
2.25
3.75
-1.00
ENDADD
;add the same numbers into a variable and display the result
ADD INTO: sum
1.50
3.50
2.25
3.75
-1.00
ENDADD
print:
print: "Total assigned to 'sum'."
print: "The sum is" sum "."
;perform addition with equations
print:
print: "Adding equations:"
add:
root_secant (x, 1, 2, x - sqrt(2))
- sqrt (2)
sin (_pi_2) / log_b (2, 2^2)
0.5
floor (sin (_pi)) * tan (_pi/3) + ceil (cos (_pi_2))
1 ^ 2e11
endadd
;add moving expenses into a variable and subtract from budget
moving budget = 3500.00;
add into: moving expenses
1200.00; truck and trailer rental
1100.00; rent and deposits
350.00; gas
180.00; motel rooms
150.00; food and road munchies
100.00; utility turn-ons
30.00; pet tranquilizers
endadd
print:
print: "ARTIFICIAL MOVE--BUDGET AND EXPENSES"
print: "Budgeted amount for this move is" moving budget "."
print: "Estimated cost for this move is" moving expenses "."
print: "If this total is < 0, do not move-->" moving budget - moving expenses